package com.tianqu.tms.www.statistics.action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import com.tianqu.tms.core.base.Logger;
import com.tianqu.tms.core.base.TmsAction;
import com.tianqu.tms.core.base.UserContext;
import com.tianqu.tms.core.taglib.MenuBean;
import com.tianqu.tms.core.taglib.MenuDigester;
import com.tianqu.tms.core.util.TmsConstants;

public class InventoryCarAgeAction extends TmsAction {

	private Logger logger = Logger.getLogger(InventoryCarAgeAction.class);

	@Override
	protected ActionForward doAction(ActionMapping mapping, ActionForm form, HttpServletRequest request,
			HttpServletResponse response, UserContext uc) throws Exception {

		MenuDigester navigationDigester = new MenuDigester();

		MenuBean navigationVO = navigationDigester
				.digest(servlet.getServletContext().getRealPath("/WEB-INF/conf/tms-statistics-menu.xml"));
		request.setAttribute(TmsConstants.MENU_VO_KEY, navigationVO);

		request.setAttribute("funcId", request.getParameter("funcId"));

		logger.debug(this.getClass().getName() + "#execute was called.version:v2");

		return mapping.findForward(TmsConstants.SUCCESS);
	}
}
